<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改表单属性</title>
</head>
<body>
    <input type="text" class="password"><br><br>
    <input type="button" value="按钮" class="button"><br><br>
    <input type="checkbox" class="checkbox">

    <script>
        // 控制是否显示密码
        const password = document.querySelector('.password')
        password.type = 'password'

        // 控制按钮禁用状态
        const button = document.querySelector('.button')
        button.disabled = true

        // 控制复选框是否勾选
        const checkbox = document.querySelector('.checkbox')
        checkbox.checked = true
    </script>
</body>
</html>